package com.jf.cloud.order.feign;

import com.jf.cloud.api.order.feign.OrderSelfStationFeignClient;
import com.jf.cloud.common.order.vo.OrderSelfStationVO;
import com.jf.cloud.common.order.vo.OrderVO;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.order.service.OrderSelfStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OrderSelfStationFeignController implements OrderSelfStationFeignClient {

    @Autowired
    private OrderSelfStationService orderSelfStationService;

    @Override
    public ServerResponseEntity<OrderVO> getOrderByStationCode(Long stationId, String code) {
        return ServerResponseEntity.success(orderSelfStationService.getOrderByStationCode(stationId, code));
    }

    @Override
    public ServerResponseEntity<List<OrderSelfStationVO>> getUserStation(Long userId) {
        return ServerResponseEntity.success(orderSelfStationService.getUserStation(userId));
    }


}
